import request from "@/utils/request";
let device = "userinfo";

export const getList = (params) => {
  return request({
    url: `/t/${device}/queryUserInfoPageList`,
    data: params,
    method: "post",
  });
};
export const gettablerizhiDataList = (params) => {
  return request({
    url: `/t/userinfo/queryLogInfoPageList`,
    data: params,
    method: "post",
  });
};
export const getdecisionList = (params) => {
  return request({
    url: `/t/userinfo/queryDecisionInfoPageList`,
    data: params,
    method: "post",
  });
};
export const getriskList = (params) => {
  return request({
    url: `/t/userinfo/queryRiskInfoPageList`,
    data: params,
    method: "post",
  });
};

export const addList = (params) => {
  return request({
    url: `/t/${device}/add`,
    data: params,
    method: "post",
  });
};
export const editList = (params) => {
  return request({
    url: `/t/${device}/update`,
    data: params,
    method: "post",
  });
};
export const updateKey = (params) => {
  return request({
    url: `/system/${device}/updateKey`,
    // headers: { 'content-type': 'application/x-www-form-urlencoded' },
    data: params,
    method: "post",
  });
};
export const delCurRow = (params) => {
  return request({
    url: `/t/${device}/delete`,
    data: params,
    method: "post",
  });
};
export const importData = (params) => {
  return request({
    url: `/system/${device}/importData`,
    params: params,
    method: "post",
  });
};
export const dataExport = (params) => {
  return request({
    url: `/system/${device}/export`,
    params: params,
    method: "post",
  });
};
export const computerList = (params) => {
  return request({
    url: `/system/computer/list`,
    params: params,
    method: "get",
  });
};
export const asyc = (params) => {
  return request({
    url: `/system/${device}/sync`,
    params: params,
    method: "post",
  });
};

export const queryAreaList = (params) => {
  return request({
    url: `/system/edgeDevice/queryAreaList`,
    params: params,
    method: "get",
  });
};
export const updateStatus = (params) => {
  return request({
    url: `/system/edgeDevice/isEnable`,
    // headers: { 'content-type': 'application/x-www-form-urlencoded' },
    data: params,
    method: "post",
  });
};
